package exp03;

import java.util.PriorityQueue;
import java.util.Queue;
//小顶堆 PQ优先级队列
public class QueueDemo {
    public static void main(String[] args) {
        Queue<Integer> Q = new PriorityQueue<>();
        for (int i = 0; i < 10; i++) {
            Q.offer(i % 5);//i ���
        }
        while (!Q.isEmpty()) {
            System.out.println(Q.peek());
            Q.poll();
        }
    }
}
